package kycadminrepo

import (
	"code.bydev.io/cht/customer/kyc_admin_service/internal/domain/kyc"
	"code.bydev.io/cht/customer/kyc_admin_service/internal/pkg/kycadminapi"
	"code.bydev.io/cht/customer/kyc_admin_service/internal/pkg/kycprovider/provider"
	"code.bydev.io/frameworks/byone/kafka"
	"code.bydev.io/frameworks/sechub-go/api"
	"git.bybit.com/svc/go/pkg/bdal"
	"git.bybit.com/svc/mod/pkg/bsecret"
	"go.uber.org/zap"
)

type KycAdminRepository = *repo
type repo struct {
	logger      *zap.Logger
	userDB      *bdal.Environment
	kycDB       *bdal.Environment
	teller      provider.Teller
	secHub      *api.Sechub
	kycSvc      kyc.KycSvc
	poaTeller   provider.Teller
	internalKey bsecret.DataKey
	kafka       kafka.Producer
}

func New(
	logger *zap.Logger,
	kycDB *bdal.Environment,
	userDB *bdal.Environment,
	secHub *api.Sechub,
	teller kycadminapi.Teller,
	kycSvc kyc.KycSvc,
	internalKey bsecret.DataKey,
	kfk kafka.Producer,
) KycAdminRepository {
	return &repo{
		logger:      logger,
		kycDB:       kycDB,
		userDB:      userDB,
		teller:      teller,
		secHub:      secHub,
		kycSvc:      kycSvc,
		poaTeller:   teller,
		internalKey: internalKey,
		kafka:       kfk,
	}
}
